package com.fdl.action.security;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;

import com.fdl.action.test.TestAction;
import com.fdl.common.utils.StringUtil;

/**
 * 登陆action
 * 
 * @project: hb-intra
 * @Date:2010-7-31
 * @version 1.0
 * @Company: 33e9
 * @author zhangYong.huang
 */
public class LoginAction{

	private Log log = LogFactory.getLog(TestAction.class);

	/**
	 * 跳到登陆页面
	 * 
	 * @return
	 * @throws Exception
	 */
	public String loginPage() throws Exception {
		HttpServletRequest request = ServletActionContext.getRequest();
		String errorInfo = request.getParameter("errorInfo");
		
		if(!StringUtil.isEmpty(errorInfo)){
			request.setAttribute("errorInfo", errorInfo);
		}
		return "loginPage";
	}
}
